package com.deryun.tyl.dao.impl;

import java.util.List;

import org.mybatis.spring.support.SqlSessionDaoSupport;
import org.springframework.beans.factory.annotation.Autowired;

import com.deryun.tyl.bean.Contact;
import com.deryun.tyl.bean.mapper.ContactMapper;

public class ContactDaoImpl extends SqlSessionDaoSupport{
	
	@Autowired
	private ContactMapper contactMapper;
	
	public List<Contact> getAllContact(){
		return contactMapper.getAllContact();
	}
	
	public int addContact(Contact contact){
		return contactMapper.addContact(contact);
	}
	
	public int deleteContact(int id){
		return contactMapper.deleteContact(id);
	}
	
	public List<Contact> searchC(String key){
		return contactMapper.searchC(key);
	}
}
